<%@ page language="java" import="java.util.*, com.zjut.zs.util.tools.*,com.zjut.zs.userinfo.manager.*, com.zjut.zs.userinfo.dao.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,
com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<jsp:include page="zs_uservalidate.jsp" flush="true"></jsp:include>
<%
if (session.getAttribute("zsUser") == null&&session.getAttribute("admin") == null&&session.getAttribute("user") == null) {
	out.print("<script>alert('由于长时间未操作，系统已经自动注销，请重新登陆');</script>");
	out.print("<script>top.window.location='main.jsp';</script>");
} else {

ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsUserStatusManager smanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsUser user = new ZsUser();
if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");
} 
ZsUserStatus userStatus = smanager.getDataByUser(user);
%>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">注册信息</a></li>
    </ul>
    </div>
    
    <form id="ff" name="add" role="form" class="form-horizontal" action="" method="post"> 
    <div class="formbody">
    
    <div class="formtitle"><span>注册信息</span></div>
    
    <ul class="forminfo">
    <li><label>身份证号<b>*</b></label><input id="usIdcard" name="usIdcard" type="text" class="dfinput"  placeholder="身份证号" value="<%=user.getUsIdcard() %>" readonly/><i>*请仔细填写，用于账号登录</i></li>
    <li><label>高考序号<b>*</b></label><input id="usBmxh" name="usBmxh" type="text" class="dfinput"  placeholder="高考序号" value="<%=user.getUsBmxh() %>" readonly/><i>*</i></li>
    <li><label>密码</label><input id="usPassword" name="usPassword" type="password" class="dfinput"  placeholder="新密码" required data-msg-required="不能为空" data-msg-psw="8-20位的大写字母，小写字母，数字和特殊字符4种组合" minlength="8" data-msg-minlength="请输入最小8位" value="<%=user.getUsPassword() %>"/><i>*8-20位的大写字母，小写字母，数字和特殊字符4种组合</i></li>
    <li><label>确认密码</label><input id="rusPassword" name="rusPassword" type="password" class="dfinput"  placeholder="确认新密码" equalTo="#usPassword" value="<%=user.getUsPassword() %>"/><i>*</i></li>
    <li><label>真实姓名<b>*</b></label><input id="usName" name="usName" type="text" class="dfinput" required placeholder="姓名" value="<%=user.getUsName() %>" readonly/><i>*请填写真实姓名</i></li>
    <li><label>手机号码<b>*</b></label><input id="usMobile" name="usMobile" type="text" class="dfinput" placeholder="手机号" required data-rule-mobile="true" data-msg-required="请输入手机号" data-msg-mobile="请输入正确格式" value="<%=user.getUsMobile() %>"  <%if(session.getAttribute("admin")==null)out.print("readonly"); %>/><i></i></li>
	
    <li><label>&nbsp;</label>
    <input id="addTime" name="addTime" type="text" class="dfinput" value="<%=user.getAddTime()%>" style="display:none;"/>
	<input id="editTime" name="editTime" type="text" class="dfinput" value="<%=user.getEditTime()%>" style="display:none;"/>
	<input id="loginTime" name="loginTime" type="text" class="dfinput" value="<%=user.getLoginTime()%>" style="display:none;"/>
	<input id="usId" name="usId" type="text" class="dfinput" value="<%=user.getUsId() %>" style="display:none;"/>
	<input id="usNo" name="usNo" type="text" class="dfinput" value="<%=user.getUsNo() %>" style="display:none;"/>
	<input id="usActive" name="usActive" type="text" class="dfinput" value="<%=user.getUsActive() %>" style="display:none;"/>
		<%if(Status.SENDSTATUS_NULL.getStatus().equals(userStatus.getSendStatus()) || Status.SENDSTATUS_NO.getStatus().equals(userStatus.getSendStatus()) || session.getAttribute("admin")!=null){ %>
		<button type="submit" class="btn btn-primary btn-sm">确认保存 </button>				
		<%} else {%>
		<button type="submit" class="btndisable" disabled>已提交</button>	
		<%} %>
      </li>
    
    </ul>
    
    
    </div>
 </form>
 
<script src="../plugins/assets/plugins/jquery-3.5.1.min.js" type="text/javascript"></script>  
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.validate.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.metadata.js" type="text/javascript"></script>
<script src="js/formvalidate.js" type="text/javascript"></script>
<script src="../admin/js/publicManager.js" type="text/javascript" charset="utf-8"></script> 

		
		<script type="text/javascript">
		var updateOneAction = '../zsUserUpdate.action?randnum='+Math.floor(Math.random()*1000000);
		var loactionurl = 'zs_user_edit.jsp';

		$(function(){
		    //jquery.validate
			$("#ff").validate({
				submitHandler: function() {
					//验证通过后 的js代码写在这里
					submitForm();
				}
			})
		})
		</script>
<%} %>
</body>

</html>
